package Package.Example.Example_1;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;

public class Example_1 {
    public static void Example_1() throws IOException {
        Socket s=new Socket("192.168.8.103",10086);
        OutputStream outputStream = s.getOutputStream();
        outputStream.write("Hello World!".getBytes());
        InputStream inputStream = s.getInputStream();
        byte[] bys=new byte[1024];
        int len=inputStream.read(bys);
        String data=new String(bys,0,len);
        System.out.println(data);
        s.close();
    }
}
